import { BasicFetchResult, BasicItem, BasicPageParams } from '../../model/baseModel';
import { ItemMenu } from './menuModel';

export interface CreateRole {
  title: string;
  remark: string;
  status?: number;
}

export interface UpdateRole extends Partial<CreateRole> {
  id: number;
}

export type ItemRole = {
  id: number;
  menus?: ItemMenu[];
} & CreateRole & BasicItem

export type ListRole = BasicFetchResult<ItemRole>;

export type SearchRole = Partial<CreateRole> & BasicPageParams & { id: number };
